package com.example.friend.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.example.core.domain.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_exam_question")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ExamQuestion extends BaseEntity {

    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "EXAM_QUESTION_ID", type = IdType.ASSIGN_ID)
    @Schema(description = "竞赛题目id")
    private Long examQuestionId;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(description = "竞赛id")
    private Long examId;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(description = "题目id")
    private Long questionId;

    @Schema(description = "题目序号")
    private Integer questionOrder;
}
